package com.yunhe.biz;

import java.util.List;

import com.yunhe.dao.IUser;
import com.yunhe.dao.UserImpl;
import com.yunhe.entity.User;

public class UserBizImpl implements IUserBiz {

	IUser iu = new UserImpl();
	@Override
	public boolean searchByUser(User user) {
		User u = iu.searchByUser(user);
		if(u!=null){
			return true;
		}else{
			return false;
		}
	}
	@Override
	public boolean addUser(User user) {
		int count = iu.addUser(user);
		if(count>0){
			return true;
		}else{
			return false;
		}
	}
	@Override
	public List<User> searchAllUser() {
		List<User> list = iu.searchAllUser();
		return list;
	}
	@Override
	public boolean delUser(User user) {
		int count = iu.delUser(user);
		if(count>0){
			return true;
		}else{
			return false;
		}
	}
	@Override
	public boolean updateUser(User user) {
		int count = iu.updateUser(user);
		if(count>0){
			return true;
		}else{
			return false;
		}
	}
}
